<%@ page import="com.yoyo.itravel.bean.User" %>
<%@ page import="com.yoyo.itravel.constants.UserConstant" %><%--
  Created by IntelliJ IDEA.
  User: 28014
  Date: 2020/5/7
  Time: 10:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" %>

<%
    // 获得用户对象
    User user = (User) request.getSession().getAttribute(UserConstant.USER);
    String email = "";
    String phone = "";
    if (user != null) {
        // 获得邮箱
        email = user.getEmail();
        // 获得手机号
        phone = user.getPhone();

        if (email != null) {
            // 对手机号和邮箱做处理
            email = email.substring(0, 3) + "****" + email.substring(email.length() - 4);
        }

        if (phone != null) {
            phone = phone.substring(0, 3) + "****" + phone.substring(phone.length() - 4);
        }
    }
%>
<%
    String contextPath = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + contextPath + "/";
%>
<html>
<head>
<base href="<%=basePath%>">

</head>
<body>

</body>
</html>
